#!/bin/sh

HERE="$(cd "$(dirname "$0")" && pwd -P)"
DATA=$HERE/../share/virtualxt
CONFIG=$($HERE/virtualxt --locate)

mkdir -p $CONFIG/boot
if [ ! -f $CONFIG/boot/freedos_hd.img ]; then
    cp $DATA/boot/freedos_hd.img $CONFIG/boot/
fi

export VXT_DEFAULT_HD_IMAGE=$CONFIG/boot/freedos_hd.img

exec "$HERE/virtualxt" "$@"
